package org.bambrikii.kbManager.kb2.managers.query4.impl.builders.hql;

import org.bambrikii.kbManager.kb2.managers.query4.ConditionSource;
import org.bambrikii.kbManager.kb2.managers.query4.ConditionType;
import org.bambrikii.kbManager.kb2.managers.query4.Like;
import org.bambrikii.kbManager.kb2.managers.query4.impl.builders.hql.q.HQLCriteria;

public class LikeImpl extends Like<HQLCriteria> {
	public LikeImpl(ConditionType type, String value) {
		super(type, value);
	}

	public HQLCriteria buildCriteria() {
		ConditionSource from = getFrom();
		HQLCriteria crit = new HQLCriteria(from, from.getAlias() + ".key"
				+ " like '" + getValue() + "'");
		return crit;
	}
}
